<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupAppend</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
	text-decoration: underline;
}
</style>
</head>
<body>

<h2>IupAppend</h2>
<p>Inserts an interface element at the end of 
  the container, <strong>after</strong> the last element of the container. Valid for any element that contains other elements like dialog, 
frame, hbox, vbox, zbox or menu.</p>
<h3>
Parameters/Return</h3>
<pre>Ihandle* IupAppend(Ihandle*<strong> ih</strong>, Ihandle*<strong> new_child</strong>); [in C]
iup.Append(<strong>ih</strong>, <strong>new_child</strong>: ihandle) -&gt; (<strong>parent</strong>: ihandle) [in Lua]</pre>
<p><strong>ih</strong>: Identifier of a container like hbox, vbox, zbox and menu.<br>
<strong>new_child</strong>: Identifier of the element to be inserted.</p>
<p><span class="style1">Returns:</span> 
  the actual <b>parent</b> if the interface element was successfully inserted. Otherwise returns NULL (nil in Lua). 
Notice that the desired parent can contains a set of elements and containers 
where the child will be actually attached so the function returns the actual 
parent of the element.</p>
<h3>Notes</h3>
<p>This function can be used when elements that 
  will compose a container are not known <i>a priori</i> and should be dynamically constructed.</p>
<p>The new child can NOT be mapped. It will NOT map the new child into the native system. If the parent is already mapped you must explicitly call <b>IupMap</b> for 
the appended child. </p>
<p>If the actual parent is a layout box (<strong>IupVbox</strong>, <strong>
IupHbox</strong> or <strong>IupZbox</strong>) and you try to append a child that 
it is already at the parent child list, then the child is moved to the last 
child position.</p>
<p>The elements are NOT immediately repositioned. Call
  <b>IupRefresh</b> for the container (or any other element in the dialog) to 
update the dialog layout.</p>
<h3>See Also</h3>
<p><a href="iupdetach.html">IupDetach</a>,
  <a href="iupinsert.html">IupInsert</a>, 
  <a href="../elem/iuphbox.html">IupHbox</a>,
  <a href="../elem/iupvbox.html">IupVbox</a>,
  <a href="../elem/iupzbox.html">IupZbox</a>,
  <a href="../elem/iupmenu.html">IupMenu</a>, 
<a href="iupmap.html">IupMap</a>, <a href="iupunmap.html">IupUnmap</a>,
<a href="iuprefresh.html">IupRefresh</a></p>

</body>

</html>